package com.excel.entity;

import com.excel.annotation.PoiExcel;
import com.excel.enums.PoiColorEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ExcelTableTest implements Serializable {

    @PoiExcel(name = "主键",orderNum = 0)
    private Long id;

    @PoiExcel(name = "姓名Test",orderNum = 1,groupName = "{name}",desensitizationRule = "1,3",color = PoiColorEnum.BLUE,width = 20)
    private String name;

    @PoiExcel(name = "性别Test",orderNum = 2,groupName = "{peopleInfo}",exportReplace  ={"男_M","女_F"},importReplace = {"M_男","F_女"},importIsMust = false)
    private String gender;

    @PoiExcel(name = "生日Test",orderNum = 3,exportFormat="yyyy-MM-dd HH:mm:ss",importFormat = "yyyy-MM-dd HH:mm:ss",importIsMust = false)
    private Date birthday;

    @PoiExcel(name = "电话号Test",orderNum = 4,desensitizationRule = "3,4")
    private String mobilePhone;

    @PoiExcel(name = "身份证Test",orderNum = 5,desensitizationRule="6_4" ,width = 20)
    //@Excel(width = )
    private String cardNo;

    @PoiExcel(name = "性别",orderNum = 6)
    private String gender2;
}